package com.project.m.api.busi.db.entity.hicatcard.distributor;

import com.project.m.api.busi.util.annotation.StringDateFormat;
import com.project.m.api.busi.util.TimeUtil;

import javax.persistence.*;

@Entity
@Table(name = "t_distributor")
public class TDistributor {

    public static final String STATUS_SHOW = "1"; // 显示
    public static final String STATUS_HIDE = "0"; // 隐藏

    public static final String TYPE_DISTRIBUTOR = "1";  //分销商
    public static final String TYPE_CHANNEL = "2";  //渠道


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "DISTRIBUTOR_ID")
    private Long distributorId;

    @Column(name = "DISTRIBUTOR_NUMBER")
    private String distributorNumber;

    @Column(name = "NAME")
    private String name;

    @Column(name = "QRCODE_PATH")
    private String qrcodePath;

    @Column(name = "STATUS")
    private String status = STATUS_SHOW;

    @Column(name = "TOTAL_TIMES")
    private Integer totalTimes;

    @Column(name = "PROTECT_DAY")
    private Integer protectDay;

    @Column(name = "TYPE")
    private String type;

    @Column(name = "CREATOR")
    private String creator;

    @StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
    @Column(name = "CREATE_TIME")
    private String createTime;

    @StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
    @Column(name = "UPDATE_TIME")
    private String updateTime;

    @Column(name = "ENABLE")
    private boolean enable = Boolean.TRUE;

    public Long getDistributorId() {
        return distributorId;
    }

    public void setDistributorId(Long distributorId) {
        this.distributorId = distributorId;
    }

    public String getDistributorNumber() {
        return distributorNumber;
    }

    public void setDistributorNumber(String distributorNumber) {
        this.distributorNumber = distributorNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getQrcodePath() {
        return qrcodePath;
    }

    public void setQrcodePath(String qrcodePath) {
        this.qrcodePath = qrcodePath;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getTotalTimes() {
        return totalTimes;
    }

    public void setTotalTimes(Integer totalTimes) {
        this.totalTimes = totalTimes;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public Integer getProtectDay() {
        return protectDay;
    }

    public void setProtectDay(Integer protectDay) {
        this.protectDay = protectDay;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
